import store from "@/store";
export function checkedPhoneAndSlide(phone, msg) {
  let reg =
    /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
  // 手机号逻辑
  if (!reg.test(phone)) {
    store.dispatch("showToast/asyncChangeStatus", {
      content: "请输入正确手机号",
      type: "info",
    });
    return false;
  }
  // 滑块逻辑
  if (msg == "再试一次" || msg == "向右滑动") {
    store.dispatch("showToast/asyncChangeStatus", {
      content: "请滑动滑块",
      type: "info",
    });
    return false;
  }

  return true;
}
